home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: hex to dec function?
- Date: 03 Mar 1996 05:06:18 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Mar2220618@qcd.lanl.gov>
- References: <4gdh1b$bg@mailhost.mwmicro.com> <4gdolr$ha9@madeline.INS.CWRU.Edu>
- <4gg3h0INN59e@keats.ugrad.cs.ubc.ca> <danpop.824997504@rscernix>
- <4hab7t$uo4@news.vcnet.com>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: swedecj@vcnet.com's message of Sat, 02 Mar 1996 20:30:22 GMT
-
- In article <4hab7t$uo4@news.vcnet.com>
- swedecj@vcnet.com (Carl Jacobson) writes:
-
- <snip>
- CJ: Why does the following hang my pc when the printf statement is being
- <snip>
- CJ: char *pref = "0x";
-
- pref now points to a possibly unmodifiable region of memory of length
- 3 containing the characters '0','x' and '\0'.
-
- <snip>
- CJ: strcat(pref,suff);
-
- This tries to overwrite the first '\0' in the region that pref points
- to, and copy the contents of the region that suff points to over
- this. This has two problems: the region was unmodifiable, and it
- simply does not have enough space.
-
- Anything from now on is completely unpredicatble.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-